package hy.config;

import org.apache.solr.client.solrj.impl.HttpSolrClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SolrCfg {
    @Bean(name="solrClient")//bean的id必须是这个名字
    public HttpSolrClient solrClient(){
        return new HttpSolrClient.Builder("http://192.168.184.100:8983/solr/test")
            .withConnectionTimeout(10000).build();
}
}